---
title: MySQL
---

Currently, MySQL is supported through the tbls integration. While direct MySQL support is not yet implemented, you can use tbls as a workaround to generate schema documentation for your MySQL database.

## Using tbls with MySQL

1. First, install tbls by following the [installation instructions](https://github.com/k1LoW/tbls?tab=readme-ov-file#install)

2. Use tbls to generate a schema.json file from your MySQL database:

```bash
tbls out -t json -o schema.json "mysql://dbuser:dbpass@hostname:3306/dbname"
```

Replace the following with your database details:

- `dbuser`: Your MySQL username
- `dbpass`: Your MySQL password
- `hostname`: Your database host (e.g., localhost)
- `3306`: Port number (default is 3306)
- `dbname`: Your database name

3. Use the generated schema.json with Liam:

```bash
npx @liam-hq/cli erd build --format=tbls --input schema.json
```

You can find sample implementations for this case on GitHub:

- GitHub Actions: [.github/workflows/mysql-with-tbls.yml](https://github.com/liam-hq/liam-erd-samples/blob/main/.github/workflows/mysql-with-tbls.yml)
- tbls project: [samples/mysql-with-tbls](https://github.com/liam-hq/liam-erd-samples/tree/main/samples/mysql-with-tbls)

For more details about using tbls format, see the [tbls documentation](/docs/parser/supported-formats/tbls#using-tbls-json-output).

## Direct MySQL Support

Direct MySQL support is planned but not yet implemented. If you're interested in this feature, please follow or contribute to the discussion on [GitHub](https://github.com/liam-hq/liam/discussions/364).
